<?php

namespace app\cps\validate;

use think\Validate;
use app\common\Error;

class Order extends Validate
{
    protected $rule = [
        'link_id' => 'require',
        'token' => 'require',
        'limit' => 'number|between:1, 100',
    ];

    protected $message = [
        'link_id.require' => Error::LINK_ID_NOT_EXIXTS,
        'token.require' => Error::TOKEN_NOT_EXIXTS,
        'limit.number' => 'limit参数必须是数字',
        'limit.between' => 'limit参数值需在1~100之间',
    ];

    protected $scene = [
        'list' => ['link_id'],
        'data' => ['link_id'],
        'daily_recharge_details' => ['link_id'],
        'distribution_order_list' => ['token', 'limit'],
        'distribution_user_list' => ['token', 'limit'],
        'distribution_select_list' => ['token'],
        'distribution_link_list' => ['token']
    ];
}